class Frame
    attr_reader :width, :height
    def initialize
      @width = 1
      @height = 1
      @frames = {}
    end
    
    def set_size(w, h)
      @width = w
      @height = h
    end

    def render(s, grid_width, grid_height, x, y)
      x1 = x * grid_width
      x2 = x1 + self.width * grid_width - 1
      y1 = y * grid_height
      y2 = y1 + self.height * grid_height - 1
      s.render_rect_border(x1, y1, x2, y2, Color.new(0, 0, 0, 150))
      s.render_rect_border(x1 + 1, y1 + 1, x2 - 1, y2 - 1, Color.new(200, 200, 0, 255))
      s.render_rect_border(x1 + 2, y1 + 2, x2 - 2, y2 - 2, Color.new(0, 0, 0, 255))
    end
end
